﻿<%@ Register TagPrefix="cc1" Namespace="BEGDC.CC.Web.Control" Assembly="ASBCC.Web" %>
<%@ Register TagPrefix="uc1" TagName="PageNavigation" Src="../UserControls/PageNavigation.ascx" %>

<%@ Page Language="c#" CodeBehind="DelegationManagement.aspx.cs" AutoEventWireup="false"
    Inherits="BEGDC.CC.Web.DelegationManagement" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <title>Alcatel-Lucent Customer Care</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <!--<link href="../css/style.css" type="text/css" rel="stylesheet" />
    <link href="../css/form.css" type="text/css" rel="stylesheet" />-->
    <link href="../css/global.css" rel="stylesheet" type="text/css" />
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <link href="../css/content/entity.css" rel="stylesheet" type="text/css" />
    <link href="../css/content/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
    <%--    <script language="JavaScript" type="text/javascript" src="../js/common.js"></script>--%>

    <script src="../js/jquery-1.4.4.min.js" type="text/javascript"></script>

    <script src="../js/jquery-ui.min.js" type="text/javascript"></script>

    <script src="../js/entity.js.aspx" type="text/javascript"></script>

    <script language="JavaScript" type="text/javascript" src="../js/calendarcode.js"></script>

    <script type="text/javascript">
        function showDialog(url) {

            var obj = window.showModalDialog(url, this, 'dialogHeight:300px;dialogWidth400px;center:Yes;scroll:no;resizable:no;status:no;');
            if (obj == 'reload') {
                //document.Form1.submit();

                window.location.href = window.location.href;
            }
        }

    </script>

    <script type="text/javascript">
        $(document).ready(function() {
            /*奇数行偶数行背景*/
            $(".tablestyle tr:even").addClass("trwhitebg");
            $(".tablestyle tr:odd").addClass("trpurplebg");
            /*列表鼠标效果*/
            $('.tbody').mouseover(function() {
                $(this).addClass('trhover');
            })
            $('.tbody').mouseout(function() {
                $(this).removeClass('trhover');
            })
        });
    </script>

</head>
<body>
    <form id="Form1" method="post" runat="server">
    <div class="mainbox">
        <uc1:PageNavigation ID="PageNavigation1" runat="server"></uc1:PageNavigation>
        <a href="../UserControls/PageNavigation.ascx"></a>
        <table id="Table9" cellspacing="0" cellpadding="0">
            <!--DWLayoutTable-->
            <tr>
                <td>
                    <table id="Table4" cellspacing="0" cellpadding="0">
                        <tr>
                            <td>
                                <!--tab区域-->
                                <div class="tabbox purplebg_dark">
                                    <ul class="tabpos">
                                        <li><span class="tab_active">
                                            <%=Resources.PageTitles.DelegationManagement%></span></li>
                                    </ul>
                                </div>
                                <div class="formbox">
                                    <span class=" float_lft">User (用户): </span><span class=" float_lft padding_lft20">
                                        <cc1:UserSearchControl ID="SearchStaff" runat="server"></cc1:UserSearchControl>
                                    </span><span class=" float_lft padding_lft20">
                                        <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="btn" />
                                    </span>
                                </div>
                            </td>
                        </tr>
                    </table>
                    <table cellpadding="0" cellspacing="0" width="100%" border="0">
                        <tr>
                            <td>
                                <br />
                                &nbsp;Roles Delegate To (委托出去的角色):
                            </td>
                        </tr>
                        <tr>
                            <td class="formbox">
                                <asp:DataGrid ID="dgRoles" ShowHeader="True" AutoGenerateColumns="False" GridLines="both"
                                    CellPadding="0" runat="server" PageSize="5" AllowPaging="True" PagerStyle-Visible="False"
                                    CssClass="tablestyle" Width="98%">
                                    <SelectedItemStyle></SelectedItemStyle>
                                    <ItemStyle CssClass="tbody"></ItemStyle>
                                    <HeaderStyle CssClass="thead"></HeaderStyle>
                                    <FooterStyle></FooterStyle>
                                    <Columns>
                                        <asp:BoundColumn Visible="False" DataField="UserRoleID"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="RoleName" ReadOnly="True" HeaderText="Role<br/>角色名">
                                            <ItemStyle Wrap="False"></ItemStyle>
                                        </asp:BoundColumn>
                                        <asp:BoundColumn DataField="NameEN" ReadOnly="True" HeaderText="Delegation<br/>委托给">
                                            <ItemStyle Wrap="False"></ItemStyle>
                                        </asp:BoundColumn>
                                        <asp:BoundColumn DataField="DelegateStartDate" ReadOnly="True" HeaderText="Start Date<br/>开始时间"
                                            DataFormatString="{0:M/d/yyyy}">
                                            <ItemStyle Wrap="False"></ItemStyle>
                                        </asp:BoundColumn>
                                        <asp:BoundColumn DataField="DelegateEndDate" ReadOnly="True" HeaderText="End Date<br/>结束时间"
                                            DataFormatString="{0:M/d/yyyy}">
                                            <ItemStyle Wrap="False"></ItemStyle>
                                        </asp:BoundColumn>
                                        <asp:BoundColumn DataField="IsEnabled" ReadOnly="True" HeaderText="Delegation Enabled<br/>委托是否有效"
                                            DataFormatString="{0:M/d/yyyy}">
                                            <ItemStyle Wrap="False"></ItemStyle>
                                        </asp:BoundColumn>
                                        <asp:TemplateColumn HeaderText="Action<br/>操作">
                                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                            <ItemTemplate>
                                                <img src="../Images/COMEDIT.GIF" alt="COMEDIT" onclick="showDialog('MyDelegation.aspx?roleid=<%# DataBinder.Eval(Container.DataItem,"UserRoleID") %>&type=all',null ,'dialogHeight=300px;dialogWidth=400px;scroll=0;resizable=0;status=0;help=0') ;"
                                                    onmouseover="this.style.cursor='hand'" />
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="Cancel<br/>取消代理">
                                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                            <ItemTemplate>
                                                <asp:ImageButton ImageUrl="../Images/icon_Delete.gif" ID="ImageDelete" CommandName="btnDelete"
                                                    runat="server"></asp:ImageButton>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                    </Columns>
                                    <PagerStyle Visible="False"></PagerStyle>
                                </asp:DataGrid>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <br />
                                &nbsp;Delegated Roles (被委托的角色):
                            </td>
                        </tr>
                        <tr>
                            <td class="formbox">
                                <asp:DataGrid ID="dgDelegated" ShowHeader="True" AutoGenerateColumns="False" GridLines="both"
                                    CellPadding="0" runat="server" PageSize="5" AllowPaging="True" PagerStyle-Visible="False"
                                    CssClass="tablestyle" Width="98%">
                                    <SelectedItemStyle></SelectedItemStyle>
                                    <ItemStyle CssClass="tbody"></ItemStyle>
                                    <HeaderStyle CssClass="thead"></HeaderStyle>
                                    <FooterStyle></FooterStyle>
                                    <Columns>
                                        <asp:BoundColumn DataField="NameEN" ReadOnly="True" HeaderText="Delegation<br/>委托者">
                                            <ItemStyle Wrap="False"></ItemStyle>
                                        </asp:BoundColumn>
                                        <asp:BoundColumn DataField="RoleName" ReadOnly="True" HeaderText="Role<br/>角色名">
                                            <ItemStyle Wrap="False"></ItemStyle>
                                        </asp:BoundColumn>
                                        <asp:BoundColumn DataField="DelegateStartDate" ReadOnly="True" HeaderText="Start Date<br/>开始时间"
                                            DataFormatString="{0:M/d/yyyy}">
                                            <ItemStyle Wrap="False"></ItemStyle>
                                        </asp:BoundColumn>
                                        <asp:BoundColumn DataField="DelegateEndDate" ReadOnly="True" HeaderText="End Date<br/>结束时间"
                                            DataFormatString="{0:M/d/yyyy}">
                                            <ItemStyle Wrap="False"></ItemStyle>
                                        </asp:BoundColumn>
                                        <asp:BoundColumn DataField="IsEnabled" ReadOnly="True" HeaderText="Delegation Enabled<br/>委托是否有效"
                                            DataFormatString="{0:M/d/yyyy}">
                                            <ItemStyle Wrap="False"></ItemStyle>
                                        </asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="UserRoleID"></asp:BoundColumn>
                                    </Columns>
                                    <PagerStyle Visible="False"></PagerStyle>
                                </asp:DataGrid>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    </form>
     <%--页面刷新时显示--%>
    <div id="dialog-message" title="Loading..." style="display: none">
        <p>
            <br />
            <span class="entity-loading"></span><span>Operation in process, please wait...<br />
                <br />
                处理中, 请稍候。。。</span>
        </p>
    </div>

</body>
</html>
